package com.yidianyanglao.core.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.logging.SimpleFormatter;

/**
 * Created by Administrator on 2016/12/8.
 */
public class DateUtils {

    /**
     * 获取今天的日期
     * @return
     */
    public static Date getToday(){
        Calendar ca = Calendar.getInstance();
        ca.set(Calendar.HOUR_OF_DAY,0);
        ca.set(Calendar.MINUTE,0);
        ca.set(Calendar.SECOND,0);
        ca.set(Calendar.MILLISECOND,0);
        Date today = ca.getTime();
        return today;
    }

    public static Date getDateTomorrow(Date date){
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.DATE,1);
        return cal.getTime();
    }

    public static void main(String[] args){
        System.out.println(getDateTomorrow(new Date()));
    }

}
